package com.cy.pj.sys.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * The type Page controller.
 *
 * @author zimin
 * @create 2019 -07-08 14:21
 */
@Controller
@RequestMapping("/")

public class PageController {
    /**
     * Do index ui string.
     *
     * @return the string
     */
    @RequestMapping("doIndexUI")
    public String doIndexUI(){
        return "starter";
    }

    /**
     * Do page ui string.
     *
     * @return the string
     */
    @RequestMapping("doPageUI")
    public String doPageUI() {
        return "common/page";
    }

    /**
     * Do module ui string.
     *  rest 风格的url
     * @PathVariable 注解用于取url数据赋值给对应变量
     * @param page the page
     * @return the string
     */
    @RequestMapping("{module}/{page}")
    public String doModuleUI(@PathVariable String page) {
        return "sys/" + page;
    }
//    @RequestMapping("log/doLogUI")
//    public String doLogUI() {
//        return "sys/log_list";
//    }
//
//    @RequestMapping("menu/doMenuListUI")
//    public String doMenuListUI() {
//        return "sys/menu_list";
//    }
}
